class Furinture():
    def __init__(self,name,size):
        self.name=name
        self.size=size

class House():
    def __init__(self,address,area):
        self.address=address
        self.area=area
        self.restarea=area
        self.furniture=[]

    def __str__(self):
        return f'地址是：{self.address},面积{self.area},剩余面积{self.restarea}，家具有{self.furniture}'

    def movefur(self,item):
        if self.restarea>=item.size:
            self.restarea-=item.size
            self.furniture.append(item.name)
        else:
            print('面积不足')

bed=Furinture('bed',5)
sofa=Furinture('sofa',10)

house1=House('上海',20)
print(house1)
house1.movefur(bed)
print(house1)